<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<c:choose>
<c:when test="${sessionScope.mvo==null}">
	<script type="text/javascript">
	$(document).ready(function(){
		alert("로그인 후 이용 가능합니다.");
		location.href="main.do";
	});
	</script>	
</c:when>
<c:otherwise>
<h1>나의 문의내역</h1>
<font size="2">
<br>
</font>
<br>
<br>
<center>
<table bordercolor="lightgrey" style="border-width: 0.5mm;" bgcolor="#F8F8F8">
	<thead >
	<tr bgcolor="#E6E6E6">
	<td><font size="2">번호</font></td><td><font size="2">제목</font></td>
	<td><font size="2">아이디</font></td><td><font size="2">작성일</font>
	</td><td><font size="2">조회수</font></td>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${requestScope.list.list }" var="list">
	<tr>
	<td><font size="2">${list.no }</font></td>
	<td>
	<c:if test="${list.relevel>0}">
	<c:forEach begin="1" end="${list.relevel }">
	&nbsp;&nbsp;&nbsp;
	</c:forEach>
	</c:if>
	<a href="showHelpInfo.do?no=${list.no }"><font size="2">${list.title }</font></a></td>
	<td><font size="2">${list.id }</font></td><td><font size="2">${list.datePosted }</font></td>
	<td><font size="2">${list.hits }</font></td>
	</tr>
	</c:forEach>
	</tbody>
</table>
<br>

<c:if test="${requestScope.list.pagingBean.previousPageGroup }">
<a href="helpList.do?pageNo=${requestScope.list.pagingBean.startPageOfPageGroup-1}">◀</a>
</c:if>
&nbsp;&nbsp;
<c:forEach var="i" 
begin="${requestScope.list.pagingBean.startPageOfPageGroup}"
end="${requestScope.list.pagingBean.endPageOfPageGroup}">
	<c:choose>
		<c:when test="${requestScope.list.pagingBean.nowPage!=i}">
		<a href="helpList.do?pageNo=${i}">${i}</a>
		</c:when>
		<c:otherwise>
		${i}
		</c:otherwise>
	</c:choose>
</c:forEach>
&nbsp;&nbsp;
<c:if test="${requestScope.list.pagingBean.nextPageGroup}">
<a href="helpList.do?pageNo=${requestScope.list.pagingBean.endPageOfPageGroup+1}">▶</a>
</c:if>
<br>
<br>
<br><br>
</center>
</c:otherwise>
</c:choose>